package list;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class MultiThreadCollection {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		List<String> demo = new ArrayList<String>();
		demo.add("One");
		demo.add("Two");
		demo.add("Three");
		demo.add("Four");
		demo.add("Five");
		Iterator<String> it = demo.iterator();
		while (it.hasNext()) {
			String a = it.next();
			if (a.equals("Three")) {
				it.remove();
			} else {
				System.out.println(a);
			}
		}

	}

}
